Xbasic

Office::ExcelDocumentCopySheet Method

Syntax

.CopySheet as Office::Spreadsheet (Name as C, Index as N)

Arguments

NameCharacter

 

IndexNumeric

 

Returns

resultOffice::Spreadsheet

 

Description

Add a new spreadsheet to the document with the name specified by copying the contents of the sheet at index N.

Example

dim Doc as Office::ExcelDocument
dim filename as C = "myworkbook.xlsx" 
if Doc.Load(filename)
    Doc.CopySheet("Sheet1",2)
end if

See Also